package ird.demo.common;

import java.util.Date;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Value;

public class SysUtil {
	@Value("${sys.curDate}")
    private static String curDateStr;
	
	public static Date getSysDate(){
		Date curDate = null;
		if(curDateStr==null || "".equals(curDateStr.trim())){
			curDate = new Date();
		}
		else{
			try{
				curDate = FormatUtil.toDate(curDateStr);
			}catch(Exception ignor){
				
			}
		}
		return curDate;
	}
	
	public static boolean isNullstr(String str){
		if(str == null || "".equals(str)){
			return true;
		}
		return false;
	}
	
}
